//
//  CheatsClassesCell.m
//  MDC
//
//  Created by Kang on 16/8/12.
//  Copyright © 2016年 YTYangK. All rights reserved.
//

#import "CheatsClassesCell.h"

@interface CheatsClassesCell ()
{
    id _collection;
}
@end

@implementation CheatsClassesCell
@synthesize tiletLabel = _tiletLabel;


- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self updateCellUI];
    }
    return  self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super initWithCoder:aDecoder]) {
        [self updateCellUI];
    }
    return self;
}

- (instancetype)initWithViewController:(UIViewController *)vc {
    if (self = [super initWithFrame:vc.view.frame]) {
        [self updateCellUI];
        _collection = vc;
    }
    return self;
}

// 设置UI
- (void)updateCellUI {
    [self setBackgroundColor:[UIColor colorWithRed:255/255.f green:255/255.f blue:255/255.f alpha:0.3]];
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = 7;
    
    [self addSubview:self.tiletLabel];
}



#pragma mark setter
-(void)setTiletLabel:(UILabel *)tiletLabel {
    if (tiletLabel != _tiletLabel) {
        _tiletLabel = tiletLabel;
    }
}

#pragma mark getter
- (UILabel *)tiletLabel {
    if (!_tiletLabel) {
        _tiletLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 15,  [[UIScreen mainScreen] bounds].size.width - 100, 15)];
        _tiletLabel.textColor = [UIColor whiteColor];
    }
    return _tiletLabel;
}


@end
